home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GETMAXY.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  497 b   |  22 lines

  1. /* getmaxy */
  2. #include <stdio.h>
  3. #include <graphics.h>
  4.  
  5. main()
  6. {
  7.     int graphdriver = DETECT,graphmode;
  8.     int i,maxy;
  9.     char buffer[80];
  10.  
  11. /* Initialize the graphics system */
  12.     initgraph(&graphdriver,&graphmode,"c:\\turboc");
  13.     outtextxy(10,20,"Demonstrating getmaxy");
  14.  
  15. /*  Get maximum y coordinate and show it */
  16.     maxy = getmaxy();
  17.     sprintf(buffer,"Maximum x coordinate is %d",maxy);
  18.     outtextxy(10,60,buffer);
  19. /* Give user a chance to see the result */
  20.     getch();
  21.     closegraph();
  22. }